package com.mzz.behavior.middleclass.mediator;

/**
 * 我的中介
 *
 * @author xushijian
 * @date 18/5/16 下午2:56
 */
public class MyMediator implements Mediator {

    private User user1;

    private User user2;

    public User getUser1() {
        return user1;
    }

    public User getUser2() {
        return user2;
    }

    public void createMediator() {
        this.user1 = new User1(this);
        this.user2 = new User2(this);
    }

    public void workAll() {

        user1.work();
        user2.work();

    }
}
